package io.github.tangwan.thread;

import java.util.Timer;
import java.util.TimerTask;

/**
 * @author tangwan
 * @version V1.0
 * created on 2021/10/8 11:33
 * @since JDK 1.8
 */
public class MyTimer {

    public static void main(String[] args) {
        Timer timer = new Timer();
        timer.schedule(new TimerTask() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName());
            }
        },0,1000);
    }

}
